package com.example.tbplus14.utils;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.nio.NioServerSocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.codec.string.StringDecoder;

import java.math.BigDecimal;
import java.util.Currency;
import java.util.Locale;

public class Test {

    public void money() {
        Money cny = Money.of(Currency.getInstance(Locale.CHINA), BigDecimal.valueOf(100));

        Money us = Money.of(Currency.getInstance(Locale.US), BigDecimal.valueOf(100));
        System.out.println(us.getAmountMinorUnit());
        System.out.println(us.getAmount());

    }

    public static void main(String[] args) {
        for (int i = 0; i < 3; i++) {
            long sleepTime = (long) (100 * Math.pow(2, i));
            System.out.println(sleepTime);
        }
    }



}
